Skip to content

Harden DSP_AudioPD adsprpcd validation and add PID helper utilities#311

Merged
abbajaj806 merged 2 commits intoqualcomm-linux:mainfrom
smuppand:audio_pd
Feb 24, 2026
Merged

Harden DSP_AudioPD adsprpcd validation and add PID helper utilities#311
abbajaj806 merged 2 commits intoqualcomm-linux:mainfrom
smuppand:audio_pd

Conversation

@smuppand
Copy link
Contributor

@smuppand smuppand commented Feb 22, 2026

This PR improves the robustness of the Multimedia/DSP_AudioPD test and fixes the issue reported #313 , reusable PID utilities to functestlib.sh to reduce CI/LAVA flakiness.

Changes

  • Runner/utils/functestlib.sh

    • Add PID helper utilities:
      • sanitize_pid(): extract a single numeric PID from noisy/multi-line output
      • get_one_pid_by_name(): return the first matching PID for a process name
      • wait_pid_alive(): wait for a PID to become alive with a timeout
  • Runner/suites/Multimedia/DSP_AudioPD/run.sh

    • Add log_info before dependency checks and SKIP when dependencies are missing
    • Use shared PID helpers for stable process discovery after daemon start/daemonize
    • Prefer /proc//wchan and accept optimized symbol suffixes (e.g. poll_schedule_timeout.constprop.*)
    • Fall back to /proc//stack; SKIP if neither interface is available
    • Kill adsprpcd only when started by the test

Add reusable helpers to make process/PID handling robust across tests:
- sanitize_pid(): extract a single numeric PID from noisy/multi-line output
- get_one_pid_by_name(): return the first PID for a process name (pgrep/get_pid/ps fallback)
- wait_pid_alive(): wait for a PID to become alive with timeout

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Improve DSP_AudioPD robustness and CI/LAVA behavior:
- Add log_info before dependency checks and SKIP when dependencies are missing
- Use shared PID helpers (sanitize_pid/get_one_pid_by_name/wait_pid_alive)
- Prefer /proc/<pid>/wchan and accept optimized symbol suffixes (e.g. constprop)
- Fall back to /proc/<pid>/stack; SKIP if neither interface is available
- Kill adsprpcd only when started by this test; always write .res and exit 0

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Copy link
Contributor

@abbajaj806 abbajaj806 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@abbajaj806 abbajaj806 merged commit 69d01e7 into qualcomm-linux:main Feb 24, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants